package com.grm.workflow.controller;

import com.grm.common.entity.PageResult;
import com.grm.common.entity.Result;
import com.grm.workflow.request.deploy.WfDeployQueryParam;
import com.grm.workflow.response.WfDeployResponse;
import com.grm.workflow.service.WfDeployService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 部署管理
 */
@RestController
@RequestMapping("/workflow/deploy")
public class WfDeployController {
    @Autowired
    private WfDeployService wfDeployService;

    @PostMapping("/list")
    public Result querySelective(@RequestParam Integer pageNum, @RequestParam Integer pageSize, @RequestBody WfDeployQueryParam queryParam) {
        // 开启分页
        PageResult<WfDeployResponse> pageResult = wfDeployService.querySelective(pageNum,pageSize,queryParam);
        return Result.success(pageResult.getData(),pageResult.getTotal());
    }
}
